<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<!-- blueprint CSS framework -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/style.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/accordion.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/bootstrap-yii.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/bootstrap.css" />
	<script src="<?php echo Yii::app()->request->baseUrl; ?>/css/OpenLayers.js" type="text/javascript"></script>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/theme/default/style.css" />


	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>
<?php include 'header.php'; ?>
	<div id="wrapper">
		<div id="main_container">
			<div id="menu_container">
				<?php include 'leftmenu.php'; ?>
			</div>
			<div id="content_container">
				
				
				
<div class = 'content'>				
<div id="userGroups-container">
	<h1>Thay đổi mật khẩu</h1>
	<div class="form">

	<?php $form=$this->beginWidget('CActiveForm', array(
		'id'=>'user-groups-password-form',
		'enableAjaxValidation'=>true,
		'enableClientValidation'=>true,
	)); ?>
		<p class="note">Thông tin có dấu <span class="required">*</span> là bắt buộc.</p>
<table>
						
						<?php if (Yii::app()->user->pbac('userGroups.user.admin') && Yii::app()->user->id !== $passModel->id) :?>
							<?php echo $form->hiddenField($passModel,'old_password', array('value'=>'filler'))?>
						<?php else: ?>
						
						<tr>
						<td>
							<?php echo $form->labelEx($passModel,'old_password'); ?> </td><td>
							<?php echo $form->passwordField($passModel,'old_password',array('size'=>60,'maxlength'=>120)); ?>
							<?php echo $form->error($passModel,'old_password'); ?>
						</td></tr>
						
						<?php endif; ?>
						
						<tr><td>
							<?php echo $form->labelEx($passModel,'password'); ?></td><td>
							<?php echo $form->passwordField($passModel,'password',array('size'=>60,'maxlength'=>120)); ?>
							<?php echo $form->error($passModel,'password'); ?>
						</td></tr>
						<tr><td>
							<?php echo $form->labelEx($passModel,'password_confirm'); ?></td><td>
							<?php echo $form->passwordField($passModel,'password_confirm',array('size'=>60,'maxlength'=>120)); ?>
							<?php echo $form->error($passModel,'password_confirm'); ?>
						</td></tr>
						<?php /* if (UserGroupsConfiguration::findRule('simple_password_reset') === false): ?>
						<div class="row">
							<?php echo $form->labelEx($passModel,'question'); ?>
							<?php echo $form->textField($passModel,'question',array('size'=>60,'maxlength'=>120)); ?>
							<?php echo $form->error($passModel,'question'); ?>
						</div>
						<div class="row">
							<?php echo $form->labelEx($passModel,'answer'); ?>
							<?php echo $form->passwordField($passModel,'answer',array('size'=>60,'maxlength'=>120)); ?>
							<?php echo $form->error($passModel,'answer'); ?>
						</div>
						<?php endif;  */?>
						<tr><td></td><td>
							<?php echo CHtml::hiddenField('formID', $form->id) ?>
							<?php echo CHtml::ajaxSubmitButton(Yii::t('userGroupsModule.general','Xác nhận'), Yii::app()->baseUrl .'/userGroups/user/update/id/'.$passModel->id, array('update' => '#userGroups-container'), array('id' => 'submit-pass'.$passModel->id.rand(), 'class'=>'btn btn-primary') ); ?>
						<td>
						</tr>
						</table>

	<?php $this->endWidget(); ?>
	</div><!-- form -->
</div>
</div>				
				
				
			</div>
		</div>
	</div>

	<?php include 'footer.php'; ?>
</body>
</html>
